package com.cppba.service;

import com.cppba.entity.City;
import com.cppba.mapper.CityMapper;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author timingbar
 * @created 2017/7/6 0006 16:00
 */
@Service
@Transactional
public class CityService {
	private final CityMapper cityMapper;

	@Autowired
	public CityService(CityMapper cityMapper) {
		this.cityMapper = cityMapper;
	}

	public List<City> findByParentId(Long parentId) {
		return cityMapper.findByParentId(parentId);
	}
}
